mixin block-item(item)
    each citem in item.content && item.content.length ? item.content : []
      if citem.type === 'text'
        p= citem.text
      else if citem.type === 'img'
        img(class="lazy" src='' data-src=citem.src width=citem.width height=citem.height)
      else if citem.type === 'form'
        table
          thead
            each th in citem.th && citem.th.length ? citem.th : []
              th= th
          tbody
            each td in citem.td && citem.td.length ? citem.td : []
              tr
                td= td.date
                td= td.num
                td= td.rate
      else if citem.type === 'card'
        div(class="sj_card")
          img(class="lazy" src='' data-src=citem.left.src alt=citem.left.alt)
          div(class="sj_team-desc")
            p(class="sj_team-name")= citem.right.name
            each ptext in citem.right.list && citem.right.list.length ? citem.right.list : []
              p= ptext.text
      else if citem.type === 'link'
        div(class="sj_link")
          span= citem.link.name
          a(href=citem.link.href target="_blank")= citem.link.href
      else if citem.type === 'd-title'
        div(class="sj_dtitle")
          span= citem.title.text
          span= citem.title.subtext


mixin block-template(content)
  each item in content && content.length ? content : []
    if item.title !== ''
      div
        div(class="sj_block_item")
          div(class="sj_i-one")= item.title
          div(class="sj_i-two")
            +block-item(item)
    else
      +block-item(item)
